package tech.cn.note.html.tool;

import java.math.BigDecimal;

import tech.cn.note.utils.BigDecimalUtil;

import org.springframework.stereotype.Component;

/**
 * 数字转换千分位展示
 *
 * @author liuyong
 */
@Component
public class DocumentThdNumConvert extends DocumentNumConvert implements DocumentConvert {

    //转换器名称
    public static String CONVERT_NAME = "thdNum";

    @Override
    public String getConvertName() {
        return CONVERT_NAME;
    }

    @Override
    public String numFormat(BigDecimal numValue, int pointNum) {
        return BigDecimalUtil.formatThd(numValue, pointNum);
    }
}
